<template>
  <a-card 
    class="general-card" title="最近访问" :header-style="{ paddingBottom: '0' }"
    :body-style="{ paddingTop: '26px' }">
    <div style="margin-bottom: -1rem">
      <a-row :gutter="8">
        <a-col v-for="link in arr" :key="link.name" :span="8" class="wrapper" @click="GoPage(link.url)">
          <div class="icon">
            <icon-send />
            <!-- <component :is="link.url" /> -->
          </div>
          <a-typography-paragraph class="text">
            {{ link.name }}
          </a-typography-paragraph>
        </a-col>
      </a-row>  
    </div>
  </a-card>
</template>

<script lang="ts" setup>
import Vue from 'vue'
import { useRoute, useRouter, RouteRecordRaw } from 'vue-router';
const links = [
  {
    text: 'workplace.contentManagement',
    icon: 'icon-storage',
  },
  {
    text: 'workplace.contentStatistical',
    icon: 'icon-file',
  },
  {
    text: 'workplace.advanced',
    icon: 'icon-settings',
  },
];
// 访问历史
const uu = window.localStorage.getItem('useurlDzinAll');
const arr = typeof uu === 'string' ? JSON.parse(uu) : uu;

const router = useRouter();
const GoPage = (url: any) => {
  router.push({ name: url, });
};
</script>

<style lang="less" scoped>
:deep(.arco-card-header-title) {
  line-height: inherit;
}
</style>
